#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class GoodInfo;
class GoodInfoDao;
class QListWidgetItem;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_search_id_input_textChanged(const QString &arg1 = QString(""),bool is_refresh = false);
    void on_good_item_list_clicked(const QModelIndex &index);
    void on_quit_action_triggered();
    void on_pw_action_triggered();
    void on_inport_action_triggered();
    void on_export_action_triggered();
    void on_about_action_triggered();
    void on_change_info_btn_clicked();
    void on_add_info_btn_clicked();
    void on_delete_info_btn_clicked();

//    void on_pushButton_clicked();
//    void on_pushButton_2_clicked();
//    void on_pushButton_3_clicked();
//    void on_pushButton_4_clicked();
//    void on_pushButton_5_clicked();

private:
    Ui::MainWindow *ui;
    GoodInfo *m_cur_select_good_info;

private:
    // 显示信息
    void ShowGoodInfo(GoodInfo *good_info);

public:
    void SetSearchIdInputValue(std::vector<QString> *str_list);

public:
    const QString IMG_DIR_PATH;

private:
    static MainWindow* instance;
public:
   static MainWindow* GetInstance();
};

#endif // MAINWINDOW_H
